﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="Slja.WEB.login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>思朗佳安项目管理</title>

<link href="inc/login-box.css" rel="stylesheet" type="text/css" />
 <script src="inc/Script/pub.js" type="text/javascript"></script>
   
        <script type="text/javascript">
            function CheckLogin() {
                var ret = true;
                var str = "";
                $id("strinfo").innerHTML = "";

                ErrorStr = new Array(); //错误消息

                if (!IsEmpty($id("txt_name").value)) {
                    ErrorStr.push("用户名不能为空,请输入用户名!");
                }

                if (!IsEmpty($id("txt_password").value)) {
                    ErrorStr.push("密码不能为空,请输入密码!");
                }

                if (!IsEmpty($id("txt_verify").value)) {
                    ErrorStr.push("验证码不能为空,请输入验证码!");
                }

                if (ErrorStr.length != 0) {
                    str = "<ul>";
                    for (var i = 0; i < ErrorStr.length; i++) {
                        str = str + "<li>" + ErrorStr[i] + "</li>";
                    }
                    str = str + "</ul>";
                    $id("strinfo").innerHTML = str;
                    $id("strinfo").style.display = "block";
                    ret = false;
                }
                else {
                    $id("strinfo").innerHTML = "";
                    $id("strinfo").style.display = "none";
                }

                return ret;
            }
    </script>
</head>

<body>
<form runat="server" id="form1">
<div style="padding: 70px 0 0 250px;">
<div id="login-box">
<H2>登录</H2>
请输入用户名和密码.
<br />
<table width="350">
    <tr><td class="login-box-name">用户名:</td><td> <input  runat="server" id="txt_name" name="txt_name" class="form-login" title="Username" value="" size="30" maxlength="2048" /></td></tr>
    <tr><td class="login-box-name">密码:</td><td><input id="txt_password" name="txt_password" type="password" class="form-login" title="Password" value="" size="30" maxlength="2048" /></td></tr>
    <tr><td class="login-box-name">验证码:</td><td><input type="text" class="form-login" autocomplete="off" style="width: 150px;" maxlength="6" id="txt_verify" name="txt_verify" /><img src="VerifyImage.ashx" alt="看不清,点击更换!" onclick="this.src=this.src+'?'" style="position:relative;top:8px;margin-left:2px;" /></td></tr>
    <tr><td></td><td></td></tr>   
    <tr><td colspan="2"><asp:ImageButton runat="server" id="btn_login" OnClick="btn_login_Click" src="inc/images/login-btn.png" width="103" height="42" style="margin-left:90px;" />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Register.aspx">用户注册</a></td></tr>
      <tr><td colspan="2" id="strinfo" style="color:Red;">&nbsp;</td></tr>
</table>

</div>
</div></form>
<script type="text/javascript">
    if (top != window) {
        top.location.hre = window.location.href;
    }
</script>
</body>
</html>
